﻿using GalaSoft.MvvmLight;
using KPI.Comm;
using KPI.Entity;
using KPI.UIBase;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CssdAssistantClient.Views
{
    public class ViewQuestionListModel : ViewModelBase
    {
        public ViewQuestionListModel()
        {
            ListQtType.Add(IntStringData.GetAll());
            ListQtType.Add(IntStringData.New((int)EnumQtType.SingleSelect, EnumHelper.QtTypeAsString((int)EnumQtType.SingleSelect)));
            ListQtType.Add(IntStringData.New((int)EnumQtType.MutilSelect, EnumHelper.QtTypeAsString((int)EnumQtType.MutilSelect)));
            ListQtType.Add(IntStringData.New((int)EnumQtType.TrueFalse, EnumHelper.QtTypeAsString((int)EnumQtType.TrueFalse)));
            ListQtType.Add(IntStringData.New((int)EnumQtType.ShortAnswer, EnumHelper.QtTypeAsString((int)EnumQtType.ShortAnswer)));
            SelectedQtType = ListQtType.FirstOrDefault();
        }
        private ObservableCollection<QuestionInfoModel> _ListQuestionBank = new ObservableCollection<QuestionInfoModel>();
        public ObservableCollection<QuestionInfoModel> ListQuestionBank { get { return _ListQuestionBank; } set { Set("ListQuestionBank", ref _ListQuestionBank, value); } }

        private DateTime? _DtStart;
        public DateTime? DtStart { get => _DtStart; set => Set("DtStart", ref _DtStart, value); }

        private DateTime? _DtEnd;
        public DateTime? DtEnd { get => _DtEnd; set => Set("DtEnd", ref _DtEnd, value); }

        private string _Name;
        public string Name { get => _Name; set => Set("Name", ref _Name, value); }

        private ObservableCollection<IntStringData> _ListQtType = new ObservableCollection<IntStringData>();
        public ObservableCollection<IntStringData> ListQtType { get { return _ListQtType; } set { Set("ListQtType", ref _ListQtType, value); } }

        private IntStringData _SelectedQtType;
        public IntStringData SelectedQtType { get => _SelectedQtType; set => Set("SelectedQtType", ref _SelectedQtType, value); }

    }
}
